function curTime()
{
	var now=new Date()
	var hrs=now.getHours()
	var min=now.getMinutes()
	var sec=now.getSeconds()
	var don="AM"
	if (hrs>=12){ don="PM" }
	if (hrs>12) { hrs-=12 }
	if (hrs==0) { hrs=12 }
	if (hrs<10) { hrs="0"+hrs }
	if (min<10) { min="0"+min }
	if (sec<10) { sec="0"+sec }
	document.getElementById("clock").innerHTML=hrs+":"+min+":"+sec+" "+don
	setTimeout("curTime()",1000)
}